{extend name="platform/base" /} {block name="main"}
<section class="panel panel-default">
	<div class="table-responsive">
		<table class="table table-striped b-t b-light text-sm">
			<thead>
				<tr>
					<th><label style="margin-left: 5px;"> <input
							type="checkbox"></label></th>
					<th>店铺Id</th>
					<th>分红开始时间</th>
					<th>分红结束时间</th>
					<th>分红总金额</th>
					<th>创建时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody id="list">
				<tr></tr>
			</tbody>
		</table>
	</div>
	{include file="platform/page" /}
</section>
{/block} {block name="script"}
<script type="text/javascript">	
$(function(){
	LoadingInfo(1);
});
	//加载数据
	//加载数据
	function LoadingInfo(pageIndex) {
		$.ajax({
			type : "post",
			url : "PLATFORM_MAIN/Distribution/commissionPartnerGlobalRecordsList",
			async : true,
			data : {
				"pageIndex" : pageIndex
			},
			success : function(data) {
				//alert(JSON.stringify(data));
				var html = '';
				$("#total_count_num").text(data["total_count"]);
				$("#page_count_num").text(data["page_count"]);
				$("#page_count").val(data["page_count"]);
				$("#pageNumber a").remove();
				if (data["data"].length > 0) {
					for (var i = 0; i < data["data"].length; i++) {
						html += '<tr>';
						html += '<td><input name="sub" type="checkbox" value="'+ data["data"][i]["id"] +'" ></td>';
						html += '<td>' + data["data"][i]["shop_id"] + '</td>';
						html += '<td>' + data["data"][i]["start_time"] + '</td>';
						html += '<td>' + data["data"][i]["end_time"] + '</td>';
						html += '<td>' + data["data"][i]["fenhong_money"] + '</td>';
						html += '<td>' + data["data"][i]["create_time"] + '</td>';
						html += '<td><a href="PLATFORM_MAIN/Commission/commissionPartnerGlobalList?records_id='+data["data"][i]["id"]+'" >查看</a></td> ';
						html += '</tr>';
					}
				} else {
					html += '<tr align="center"><th colspan="10">暂无符合条件的数据记录</th></tr>';
				}
				
				$("#list").html(html);
				var totalpage = $("#page_count").val();
				if (totalpage == 1) {
					changeClass("all");
				}
				var $html = pagenumShow(jumpNumber,totalpage,{$pageshow})
				$("#pageNumber").append($html);
			}
		});
	}	
</script>
{/block}
